Optimal. Leaf size=60 \[ -\frac{a \tanh ^{-1}(\cos (c+d x))}{2 d}-\frac{a \cot (c+d x) \csc (c+d x)}{2 d}-\frac{b \csc (c+d x)}{d}+\frac{b \tanh ^{-1}(\sin (c+d x))}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0679689, antiderivative size = 60, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 6, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.316, Rules used = {3517, 3768, 3770, 2621, 321, 207} \[ -\frac{a \tanh ^{-1}(\cos (c+d x))}{2 d}-\frac{a \cot (c+d x) \csc (c+d x)}{2 d}-\frac{b \csc (c+d x)}{d}+\frac{b \tanh ^{-1}(\sin (c+d x))}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3517
Rule 3768
Rule 3770
Rule 2621
Rule 321
Rule 207
Rubi steps
\begin{align*} \int \csc ^3(c+d x) (a+b \tan (c+d x)) \, dx &=\int \left (a \csc ^3(c+d x)+b \csc ^2(c+d x) \sec (c+d x)\right ) \, dx\\ &=a \int \csc ^3(c+d x) \, dx+b \int \csc ^2(c+d x) \sec (c+d x) \, dx\\ &=-\frac{a \cot (c+d x) \csc (c+d x)}{2 d}+\frac{1}{2} a \int \csc (c+d x) \, dx-\frac{b \operatorname{Subst}\left (\int \frac{x^2}{-1+x^2} \, dx,x,\csc (c+d x)\right )}{d}\\ &=-\frac{a \tanh ^{-1}(\cos (c+d x))}{2 d}-\frac{b \csc (c+d x)}{d}-\frac{a \cot (c+d x) \csc (c+d x)}{2 d}-\frac{b \operatorname{Subst}\left (\int \frac{1}{-1+x^2} \, dx,x,\csc (c+d x)\right )}{d}\\ &=-\frac{a \tanh ^{-1}(\cos (c+d x))}{2 d}+\frac{b \tanh ^{-1}(\sin (c+d x))}{d}-\frac{b \csc (c+d x)}{d}-\frac{a \cot (c+d x) \csc (c+d x)}{2 d}\\ \end{align*}
Mathematica [C] time = 0.0265519, size = 107, normalized size = 1.78 \[ -\frac{a \csc ^2\left (\frac{1}{2} (c+d x)\right )}{8 d}+\frac{a \sec ^2\left (\frac{1}{2} (c+d x)\right )}{8 d}+\frac{a \log \left (\sin \left (\frac{1}{2} (c+d x)\right )\right )}{2 d}-\frac{a \log \left (\cos \left (\frac{1}{2} (c+d x)\right )\right )}{2 d}-\frac{b \csc (c+d x) \, _2F_1\left (-\frac{1}{2},1;\frac{1}{2};\sin ^2(c+d x)\right )}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.082, size = 75, normalized size = 1.3 \begin{align*} -{\frac{b}{d\sin \left ( dx+c \right ) }}+{\frac{b\ln \left ( \sec \left ( dx+c \right ) +\tan \left ( dx+c \right ) \right ) }{d}}-{\frac{\cot \left ( dx+c \right ) a\csc \left ( dx+c \right ) }{2\,d}}+{\frac{a\ln \left ( \csc \left ( dx+c \right ) -\cot \left ( dx+c \right ) \right ) }{2\,d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.14193, size = 112, normalized size = 1.87 \begin{align*} \frac{a{\left (\frac{2 \, \cos \left (d x + c\right )}{\cos \left (d x + c\right )^{2} - 1} - \log \left (\cos \left (d x + c\right ) + 1\right ) + \log \left (\cos \left (d x + c\right ) - 1\right )\right )} - 2 \, b{\left (\frac{2}{\sin \left (d x + c\right )} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )}}{4 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.89013, size = 367, normalized size = 6.12 \begin{align*} \frac{2 \, a \cos \left (d x + c\right ) -{\left (a \cos \left (d x + c\right )^{2} - a\right )} \log \left (\frac{1}{2} \, \cos \left (d x + c\right ) + \frac{1}{2}\right ) +{\left (a \cos \left (d x + c\right )^{2} - a\right )} \log \left (-\frac{1}{2} \, \cos \left (d x + c\right ) + \frac{1}{2}\right ) + 2 \,{\left (b \cos \left (d x + c\right )^{2} - b\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - 2 \,{\left (b \cos \left (d x + c\right )^{2} - b\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 4 \, b \sin \left (d x + c\right )}{4 \,{\left (d \cos \left (d x + c\right )^{2} - d\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \tan{\left (c + d x \right )}\right ) \csc ^{3}{\left (c + d x \right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.51231, size = 159, normalized size = 2.65 \begin{align*} \frac{a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 8 \, b \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 1 \right |}\right ) - 8 \, b \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 1 \right |}\right ) + 4 \, a \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) \right |}\right ) - 4 \, b \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - \frac{6 \, a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 4 \, b \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + a}{\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2}}}{8 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]